varying vec4 v_color;
varying vec2 v_texCoord;

uniform sampler2D u_texture;
uniform vec2 iResolution;

// 生成智慧城市的光带效果
void main() {
  float time = fract(czm_frameNumber / 60.0);
  vec2 uv = gl_FragCoord.xy / iResolution.xy;
  float d = uv.x;
  float r = 0.01;
  r = abs(sin(r * czm_frameNumber));
  vec4 wenliColor = texture2D(u_texture, v_texCoord);
  vec4 centerColor = vec4(0.0, 245.0, 255.0, 1.0);
  float ratio = smoothstep(r, r + 0.02, d) - smoothstep(r + 0.029, r + 0.06, d);
  vec4 mixColor = vec4(mix(vec4(ratio), centerColor, ratio));
  vec4 guangdaiColor = vec4(mix(wenliColor, mixColor, ratio));
  gl_FragColor = guangdaiColor;
  // gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
  // gl_FragColor = vec4(v_color.rgb, 1.0 - time);
}